package chat.bean;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;

@Data
@AllArgsConstructor
public class Message implements Serializable {

    private static final long serialVersionUID = 1834733403432909436L;
    /**
     * 消息类型
     */
    private Integer type;
    /**
     * 消息内容
     */
    private String content;
    /**
     * 用户名
     */
    private String username;
    /**
     * 密码
     */
    private String password;
    /**
     * 发给谁
     */
    private String toFriend;

    public Message(Integer type, String content, String username) {
        this.type = type;
        this.content = content;
        this.username = username;
    }

    public Message(Integer type, String content, String username, String password) {
        this.type = type;
        this.content = content;
        this.username = username;
        this.password = password;
    }
}
